﻿using System;
using System.Collections.Generic;
using System.Text;
using Hkwl.WorldExpo.Merchant.Model;
using Hkwl.WorldExpo.Merchant.DataAccess;

namespace Hkwl.WorldExpo.Merchant.Service.Impl
{
    public class AdminServiceImpl : IAdminService
    {
        private IAdminDao infoDao;

        public AdminServiceImpl(IAdminDao infaDao)
        {
            this.infoDao = infoDao;
        }

        #region NxAdmin 对象

        public NxAdmin GetNxAdminById(int adminId)
        {
            return infoDao.GetNxAdminById(adminId);
        }

        public bool InsertNxAdmin(NxAdmin admin)
        {
            return infoDao.InsertNxAdmin(admin);
        }

        public bool UpdateNxAdmin(NxAdmin admin)
        {
            return infoDao.UpdateNxAdmin(admin);
        }

        #endregion

        #region NxAdminPermission 对象

        public IList<NxAdminPermission> GetNxAdminPermissioinCollection()
        {
            return infoDao.GetNxAdminPermissioinCollection();
        }

        public bool InsertNxAdminPermission(NxAdminPermission permission)
        {
            return infoDao.InsertNxAdminPermission(permission);
        }

        public bool UpdateNxAdminPermission(NxAdminPermission permission)
        {
            return infoDao.UpdateNxAdminPermission(permission);
        }

        #endregion

        #region NxAdminLog 对象

        public bool InsertNxAdminLog(NxAdminLog adminLog)
        {
            return infoDao.InsertNxAdminLog(adminLog);
        }

        public NxAdminLog GetNxAdminLogById(int logId)
        {
            return infoDao.GetNxAdminLogById(logId);
        }

        public IList<NxAdminLog> GetNxAdminLogCollection(int adminId, int pageIndex, int pageSize, ref int count)
        {
            return infoDao.GetNxAdminLogCollection(adminId, pageIndex, pageSize, ref count);
        }

        #endregion
    }
}
